package top.zhangjianyong.tools.service.api;

import top.zhangjianyong.tools.entity.ETF;
import top.zhangjianyong.tools.model.ETFTotalDiff;
import top.zhangjianyong.tools.model.EtfDeliveryQuery;
import top.zhangjianyong.tools.parm.KLineParam;
import top.zhangjianyong.tools.utils.ApiResponse;

import java.util.List;

public interface ETFDateService {

    /**
     * 更新净值
     */
    ApiResponse saveOrUpdate(String code) throws Exception;


    ApiResponse sameHis();

    ApiResponse list();


    ApiResponse search(String code);

    /**
     * @param isCurrent true 获取实时价格
     */
    ETFTotalDiff todaySame(String code, boolean isCurrent) throws Exception;

    void saveOrUpdatePage(String code) throws Exception;

    /**
     *
     * @param type 0-使用mairui接口 1-使用sohu接口
     */
    ETF updateETF(String code,int type);

    ApiResponse updateAll() throws Exception;

    ApiResponse doTimerStart();

    ApiResponse doTimerEnd();

    ApiResponse doTimerMonth();

    ApiResponse median();

    ApiResponse median(String unit, int num);

    ApiResponse delivery(EtfDeliveryQuery query);

    ApiResponse updateNew();

    ApiResponse hold(String code, Integer flag);

    ApiResponse down3Rate();

    ApiResponse remove(String code);

    ApiResponse listAllData(int limit);

    ApiResponse listAll();

    ApiResponse getKLine(List<KLineParam> params);

    ApiResponse opportunity(String type);


    ApiResponse getData(List<KLineParam> params);
}
